﻿<controls:ChildWindow x:Class="TheCollectiveNetwork.Views.Administration.PersonDetailsWindow"
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
           xmlns:CustomControls="clr-namespace:TheCollectiveNetwork.CustomControls"  
           xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
           Width="400" Height="300" 
           Title="Person Details"
           Style="{StaticResource DefaultChildWindowStyle}">

    <Grid x:Name="LayoutRoot" Width="400" Height="400">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>           
        </Grid.RowDefinitions>
        <Border x:Name="PersonDetailsBorder" Grid.Row="0" Grid.Column="0" BorderThickness="0"  Visibility="Collapsed"  >
                <StackPanel  Margin="0">

                    <Grid x:Name="PersonDetailsGrid" HorizontalAlignment="Center"  VerticalAlignment="Top">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>
                        <sdk:Label Content="First name:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                        <TextBox Grid.Column="1" Grid.Row="0" Height="23" HorizontalAlignment="Left" Margin="3" Name="first_nameTextBox" Text="{Binding Path=first_name, Mode=TwoWay, NotifyOnValidationError=true, ValidatesOnExceptions=true, TargetNullValue=''}" VerticalAlignment="Center" Width="200" />
                        <sdk:Label Content="Last name:" Grid.Column="0" Grid.Row="1" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                        <TextBox Grid.Column="1" Grid.Row="1" Height="23" HorizontalAlignment="Left" Margin="3" Name="last_nameTextBox" Text="{Binding Path=last_name, Mode=TwoWay, NotifyOnValidationError=true, ValidatesOnExceptions=true, TargetNullValue=''}" VerticalAlignment="Center" Width="200" />
                        <sdk:Label Content="Organisation:" Grid.Column="0" Grid.Row="2" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                        <TextBox Grid.Column="1" Grid.Row="2" Height="23" HorizontalAlignment="Left" Margin="3" Name="organisationTextBox" Text="{Binding Path=organisation, Mode=TwoWay, NotifyOnValidationError=true, ValidatesOnExceptions=true, TargetNullValue=''}" VerticalAlignment="Center" Width="200" />
                        <sdk:Label Content="Phone number:" Grid.Column="0" Grid.Row="3" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                        <TextBox Grid.Column="1" Grid.Row="3" Height="23" HorizontalAlignment="Left" Margin="3" Name="phone_numberTextBox" Text="{Binding Path=phone_number, Mode=TwoWay, NotifyOnValidationError=true, ValidatesOnExceptions=true, TargetNullValue=''}" VerticalAlignment="Center" Width="200" />
                    </Grid>

                    <StackPanel Margin="15" VerticalAlignment="Top"  HorizontalAlignment="Center" Grid.Row="1" Grid.Column="1" Orientation="Horizontal">
                        <CustomControls:GuidButton x:Name="PersonSaveDetailsBtn" Content="Save"    Width="60" Height="25" Margin="0,0,5,0" Click="PersonSaveDetailsBtn_Click"/>
                        <CustomControls:GuidButton x:Name="PersonCloseDetailsBtn" Content="Close"  Width="60" Height="25" Click="PersonCloseDetailsBtn_Click" />
                    </StackPanel>

                    <StackPanel x:Name="PersonDetailsGrid_MessagePanel" >
                        <TextBlock x:Name="PersonDetailsGrid_MessagePanel_MessageTextBlock" VerticalAlignment="Top" TextWrapping="Wrap"/>
                        <CustomControls:CustomList x:Name="PersonDetailsGrid_MessagePanel_CustomList" />
                    </StackPanel>
                </StackPanel>
            </Border>

        <Border x:Name="PersonDetailsDeleteBorder"  Grid.Row="0" Grid.Column="0" BorderThickness="0" Visibility="Collapsed" >
                <StackPanel  Margin="10">
                    <TextBlock Text="Are you sure you want to delete the following user;" VerticalAlignment="Top" TextWrapping="Wrap"/>
                    <TextBlock x:Name="PersonDetailsDelete_Username_Textblock" Text="{Binding Path=username, Mode=OneTime, NotifyOnValidationError=true, ValidatesOnExceptions=true, TargetNullValue=''}" VerticalAlignment="Top" TextWrapping="Wrap" HorizontalAlignment="Center" Margin="5"/>
                    <StackPanel Margin="15" VerticalAlignment="Top"  HorizontalAlignment="Center" Grid.Row="0" Grid.Column="1" Orientation="Horizontal">
                        <CustomControls:GuidButton x:Name="PersonDetailsDelete_Delete_Btn" Content="Confirm Delete"    Click="PersonDetailsDelete_Delete_Btn_Click" Width="100" Height="25" Margin="0,0,5,0" GuidID="{Binding Path=User_GUID, Mode=OneTime, NotifyOnValidationError=true, ValidatesOnExceptions=true, TargetNullValue=''}"/>
                        <CustomControls:GuidButton x:Name="PersonDetailsDelete_Close_Btn" Content="Close"  Click="PersonDetailsDelete_Close_Btn_Click" Width="60" Height="25" />
                    </StackPanel>
                    <StackPanel x:Name="PersonDetailsDelete_MessagePanel" >
                        <TextBlock x:Name="PersonDetailsDelete_MessagePanel_MessageTextBlock" VerticalAlignment="Top" TextWrapping="Wrap"/>
                    </StackPanel>
                </StackPanel>
            </Border>

            <Border x:Name="PersonDetailsRecordNotExistBorder"  Grid.Row="0" Grid.Column="0" BorderThickness="0" Visibility="Collapsed" >
                <StackPanel  Margin="10">
                    <TextBlock Text="Record does not exist." VerticalAlignment="Top" TextWrapping="Wrap"/>
                </StackPanel>
            </Border>

    </Grid>
       
       
  
</controls:ChildWindow>